﻿<%@ Page Title="" Language="C#" MasterPageFile="~/master/admin.master" AutoEventWireup="true"
    CodeFile="admin-cms.aspx.cs" Inherits="admin_admin_cms" ValidateRequest="false" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<%@ Register Namespace="ECommerce.Library.Web" TagPrefix="ucc" %>
<%@ Register Src="~/controls/wucAdminValidator.ascx" TagName="AdminValidator" TagPrefix="wuc" %>
<%@ MasterType VirtualPath="~/master/admin.master" %>
<asp:Content ID="cntMiddleContent" ContentPlaceHolderID="cphMiddleContent" runat="Server">
    <div class="admin-function-top">
    <ucc:ResponseMessage ID="uccResponseMessage" runat="server" ></ucc:ResponseMessage>
        <asp:ValidationSummary ID="ValidationSummary2" runat="server" EnableClientScript="true"
            DisplayMode="BulletList" ShowMessageBox="true" HeaderText="Please correct the following:"
            CssClass="adminValidator" />
            <br />

        <label>
            Title:</label>
        <asp:TextBox ID="txtCmsTitle" Enabled="false" runat="server" Width="95%" CssClass="text"></asp:TextBox>
        <br />
      <%--  <textarea name="editor1" id="ckeditor">&lt;p&gt;Initial value.&lt;/p&gt;</textarea>--%>
      <div style="padding-left:28px; ">
        <FCKeditorV2:FCKeditor ID="fckContent" runat="server" BasePath="~/thirdparty/fckeditor/"
            Width="928px" Height="350px">
        </FCKeditorV2:FCKeditor>
        </div>
        <br />
        <div class="btn-place-holder">
            <asp:Button ID="imbReset" runat="server" CausesValidation="false" OnClientClick="javascript:ResetFields();return false;"
                CssClass="button medium white" Text="Reset" />
            <asp:Button ID="imgSaveBottom" runat="server" AlternateText=" " CssClass="button medium black"
                OnClick="Create_Click" Text="Save" />
        </div>
        <br class="clear" />
    </div>
    <br class="clear" />
    <input id="hidCKEDitorValue" type="hidden" runat="server" />
    <script type="text/javascript">
        $(document).ready(function () {
            $('#ckeditor').ckeditor();
            $('#ckeditor').val($("#<%= hidCKEDitorValue.ClientID %>").val());
        });
        function GetCKEditorData() {
            var data = $('#ckeditor').val();

            if (data != "") {
                $("#<%= hidCKEDitorValue.ClientID %>").val(data);
                return true;
            }
            else {
                alert("Empty is not allowed.");
                return false;
            }

        }
        function ResetFields() {
            $('#ckeditor').val() = '';
        }
    </script>
</asp:Content>
